import request from '@/utils/request'


// 根据随货同行单id获取数据
export function getPurPurchaseOrderByOutOrderId(outOrderId) {
  return request({
    url: '/erp/purchase-in-order/getPurPurchaseOrderByOutOrderId?outOrderId=' + outOrderId,
    method: 'get'
  })
}

// 创建ERP 打款申请
export function createPurchaseInOrder(data) {
  return request({
    url: '/erp/purchase-in-order/create',
    method: 'post',
    data: data
  })
}

// 更新ERP 打款申请
export function updatePurPurchaseOrder(data) {
  return request({
    url: '/erp/purchase-in-order/update',
    method: 'put',
    data: data
  })
}
// 根据随货同行单id修改采购入库审批单
export function updatePurPurchaseOrderByOutOrderId(data) {
  return request({
    url: '/erp/purchase-in-order/updatePurPurchaseOrderByOutOrderId',
    method: 'put',
    data: data
  })
}

// 获得ERP 打款申请
export function getPurPurchaseOrder(id) {
  return request({
    url: '/erp/purchase-in-order/get?id=' + id,
    method: 'get'
  })
}

// 获得ERP 打款申请分页
export function getPurPurchaseOrderPage(params) {
  return request({
    url: '/erp/purchase-in-order/page',
    method: 'get',
    params
  })
}
  // 获得ERP 打款申请分页
  export function getPurPurchaseOrderPageadd(params) {
    return request({
      url: '/erp/purchase-in-order/pageadd',
      method: 'get',
      params
    })
  }
    